const puppeteer = require('puppeteer')

async function anjuke() {
    const brower = await puppeteer.launch({headless: false})
    const page = await brower.newPage()

    await page.goto('https://login.anjuke.com/login/form')

    // await page.frames().map(frame => console.log(frame))
    // 切换iframe  用find找到我们要找的https://login.anjuke.com/login/iframeform的ifame
    const frame = await page.frames().find(frame => frame.url().includes('https://login.anjuke.com/login/iframeform'))

    const inputPhone = await frame.$('#phoneIpt')
    await inputPhone.type('13593366548')
}
anjuke()
